package com.ra.jalmanac.hibernate.dao;


import org.hibernate.SessionFactory;
import org.springframework.orm.hibernate3.HibernateTemplate;

public class BookDaoImpl implements BookDao {

    private HibernateTemplate hibernateTemplate;

    public void setSessionFactory(SessionFactory sessionFactory) {
        this.hibernateTemplate = new HibernateTemplate(sessionFactory);
    }

    public void save(Book book){

        this.hibernateTemplate.saveOrUpdate(book);

    }
}
